

import request from '@/router/axios'

export function fetchList(query) {
  return request({
    url: '/subwayst/swStTicketTest/page',
    method: 'get',
    params: query
  })
}

export function addObj(obj) {
  return request({
    url: '/subwayst/swStTicketTest/',
    method: 'post',
    data: obj
  })
}

export function getObj(id) {
  return request({
    url: '/subwayst/swStTicketTest/' + id,
    method: 'get'
  })
}

export function delObj(row) {
  return request({
    url: '/subwayst/swStTicketTest/' + row.id,
    method: 'delete'
  })
}

export function exportExcel(query) {
  return request({
    url: '/subwayst/swStTicketTest/export',
    method: 'get',
    responseType:'blob',
    params: query
  })
}

export function putObj(obj) {
  return request({
    url: '/subwayst/swStTicketTest/',
    method: 'put',
    data: obj
  })
}

export function putResult(obj) {
  return request({
    url: '/subwayst/swStTicketTest/result/ref',
    method: 'put',
    data: obj
  })
}

export function getResult(id) {
  return request({
    url: '/subwayst/swStTicketTest/result/ref/'+id,
    method: 'get'
  })
}

export function testObj(obj) {
  return request({
    url:'/subwayst/swStTicketTest/submit',
    method:'put',
    data:obj
  })
}

export function approveObj(obj) {
  return request({
    url: '/subwayst/swStTicketTest/audit',
    method: 'put',
    data: obj
  })
}